FROM centos:7.6.1810

COPY jdk1.8.0_201 /jdk1.8.0_201
COPY apache-maven-3.6.3 /apache-maven-3.6.3

RUN yum install -y sudo \
  && yum install -y initscripts \
  && yum install -y ntp ntpdate \
  && yum localinstall -y https://dev.mysql.com/get/mysql80-community-release-el7-7.noarch.rpm \
  && yum install -y mysql-community-server \
  && curl -sL https://rpm.nodesource.com/setup_16.x | bash - \
  && yum install -y nodejs \
  && curl --silent --location https://gitee.com/moonnow/sh/raw/master/docker/nginx/nginx.repo | tee /etc/yum.repos.d/nginx.repo \
  && yum install -y yum-utils \
  && yum install -y nginx \
  && curl --silent --location https://dl.yarnpkg.com/rpm/yarn.repo | tee /etc/yum.repos.d/yarn.repo \
  && yum install -y yarn \
  && yum install -y git \
  && yum install -y openssh-server \
  && yum install -y openssh-clients \
  && yum install -y sshpass \
  && yum install -y expect \
  && sed -i '$a\\nexport JAVA_HOME=/jdk1.8.0_201\nexport PATH=$JAVA_HOME/bin:$PATH\nexport PATH=/apache-maven-3.6.3/bin:$PATH\nexport PATH' /etc/bashrc \
  && source /etc/bashrc \
  && yum clean all

CMD ["/usr/sbin/init"]
